essentialsdocsfandomcom-20200214-history
Triple Triad
Triple Triad is a mini-game included with Pokémon Essentials. It is a Pokémon-themed version of the Triple Triad mini-game in Final Fantasy VIII. How to play Triple Triad is a card game played on a 3x3 board. At the start of a game, each player chooses 5 cards they own to be their hand for that game, and then take turns playing their cards in unoccupied spaces of the board. Each card has 4 numbers on it, one per side, which range from 1 to 10 (known as A). If a card is played which touches an opponent's card on a side, the touching numbers are compared. If the number on the newly-placed card is higher than the opponent's card's number, that opponent's card is captured and swaps ownership. Nothing happens if the newly-placed card's number is equal or less than the opponent's card's number. The goal is to control the most cards on the board at the end of the game, when no further cards can be played. The winner receives one random card used by the loser. No cards change hands if the game is a draw. Rule variations There are a number of rules and modifications which can be applied to a Triple Triad game. These are all optional, and any combination of these rules can be applied. In addition, the prize for winning/cost for losing a game can be changed to be one of the following instead: Card details A Triple Triad card features a species of Pokémon. All cards of a species are identical. The card's type will be the first type of that species, as defined in the PBS file "pokemon.txt". The only exception is if the first type is Normal and the second type isn't (e.g. Flying), in which case it will be the second type instead. The four numbers on each card derive from the base stats of that card's species, as defined in the PBS file "pokemon.txt": * The west number uses the base Attack. * The east number uses the base Defense. * The north number uses the base Special Attack. * The south number uses the base Special Defense. The base stats are converted into card values as shown in the below table. A card's price depends on the highest value it has, as the below table also shows. Playing Triple Triad To play Triple Triad, use the following script: pbTriadDuel("Zaphod",0,5) The three arguments are the opponent's name, minimum level and maximum level. The levels can be between 0 and 9 inclusive, and the maximum level must be higher than the minimum level. Opponents are generated with a random set of cards. 200 possible cards are randomly generated and listed in order of the sum of their four values. The minimum and maximum levels determine how far down this list to choose 5 cards from (higher levels means stronger cards). This will begin a basic game of Triple Triad. Additional arguments You may wish to customise certain games. You can do so by including additional arguments in the above script. A full list of possibilities is as follows: pbTriadDuel(name,minLevel,maxLevel,rules,oppDeck,prize) * "rules" is an array of rule phrases, each of which applies one of the rule variations mentioned above. * "oppDeck" is an array of 5 Pokémon species, which set the 5 cards you want that opponent to use (Rather than choosing them randomly). Each one is a colon followed by the internal name of the species. * "prize" is a Pokémon species (with a comma in front of it). If the player wins the game, rather than applying the game's prize rule, they will instead gain 1 copy of a card of this species. Losing or drawing the game are not affected. If you don't want to use one or more of these options, put "nil" in its place (without quote marks). Some examples are as follows: pbTriadDuel("Alice",0,5,"countunplayed","samewins","elements","direct") pbTriadDuel("Tim",0,5,nil,:BULBASAUR,:CHARMANDER,:SQUIRTLE,:PIKACHU,:CLEFAIRY) pbTriadDuel("Sophie",0,5,nil,nil,:ARCEUS) Result of the game The def pbTriadDuel will return a value depending on the outcome of the battle: * 1 = player won * 2 = player lost * 3 = draw You can use this information in a Conditional Branch in an event, like so: @>Conditional Branch: Script: pbTriadDuel("Zaphod",0,5) 1 @>Text: You won! @> : Else @>Text: You lost or drew the game... @> : Branch End @> Gaining cards To give the player a Triad card, use the following script: pbGiveTriadCard(:PIKACHU,1) The number is how many of that card to give. This will return TRUE if the card(s) were added, and FALSE if not. It does not display any messages. Card Shop There are two scripts you can use to buy or sell Triad cards. They are as follows: pbBuyTriads pbSellTriads "pbBuyTriads" will let you buy cards of any species that are listed as owned in the Pokédex. "pbSellTriads" will let you sell any cards you possess. You can sell cards even if you would end up without enough cards to play a game. Cards are sold for a quarter of their buying price. Viewing cards To show the player a list of the Triple Triad cards they have, use the following script: pbTriadList